package com.sumainfor.pc.epc.controller.gmio;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.pc.epc.dao.GmioSearchEpcMapper;
import com.sumainfor.pc.epc.service.impl.gmio.GmioSearchEpcService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务管家工作台搜索
 * <p>
 *
 * @author: zc
 * @create: 2019-08-06 16:24
 **/
@Controller
@RequestMapping("/key/GmioSearch")
public class GmioSearchEpcController {

    @Autowired
    GmioSearchEpcMapper gmioSearchEpcMapper;

    @Autowired
    GmioSearchEpcService gmioSearchEpcService;

    @ResponseBody
    @PostMapping("/getTenRepair")
    public JsonResult getTenRepair(@RequestBody Map<String,Object> params){
        JsonResult result = new JsonResult();
        return result.put(gmioSearchEpcMapper.getTenRepair(params));
    }


    /**
     * 根据房源编号查询新房验收
     * @author zhoucong
     * @data 2019/9/19
     * @Param
     * @return
     */
    @ResponseBody
    @PostMapping("/getHoDecorateFugjList")
    public List<Map<String,Object>> getHoDecorateFugjList(@RequestParam String search){
        return gmioSearchEpcService.getHoDecorateFugjList(search);
    }

    /**
     * 服务管家根据租客id集合查询维修申请
     * @author zhoucong
     * @data 2019/9/19
     * @Param
     * @return
     */
    @ResponseBody
    @PostMapping("/getFugjRepairList")
    public List<Map<String,Object>> getFugjRepairList(@RequestBody Map<String,Object> params){
        return gmioSearchEpcService.getFugjRepairList(params);
    }

}
